package com.java.client;


import com.java.client.fallback.CoreUserInfoClientFallback;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

//fallback = CoreUserInfoClientFallback.class 远程调用失败直接返回false 执行下面的代码
@FeignClient(value = "service-core" , fallback = CoreUserInfoClientFallback.class)
@Repository
public interface CoreFeignClient {

    @ApiOperation("校验手机号")
    @PostMapping("/api/core/userInfo/checkPhone/{phone}")
    Boolean checkPhone(@PathVariable("phone") String phone);
}
